/**
 * 
 */
package com.hand.cloud.b2b.daos.impl;

import de.hybris.platform.catalog.enums.ArticleApprovalStatus;
import de.hybris.platform.catalog.model.CatalogModel;
import de.hybris.platform.catalog.model.CatalogVersionModel;
import de.hybris.platform.core.model.product.ProductModel;
import de.hybris.platform.servicelayer.ServicelayerTransactionalTest;

import java.util.Locale;

import javax.annotation.Resource;

import junit.framework.Assert;

import org.junit.Test;

import com.hand.cloud.b2b.daos.EPProductDAO;
import com.hand.cloud.b2b.model.EPProductModel;


/**
 * @author Rex.xue
 * @time 2014-8-26 下午3:19:44
 * 
 */
public class DefaultEPProductDAOTest extends ServicelayerTransactionalTest
{

	@Resource
	private EPProductDAO epProductDAO;

	@Test
	public void test()
	{

		ProductModel product = new ProductModel();
		product.setApprovalStatus(ArticleApprovalStatus.CHECK);
//
//		CatalogModel catalog = new CatalogModel();
//		catalog.setDefaultCatalog(Boolean.TRUE);
//		catalog.setId("catalog1");
//
//		CatalogVersionModel catalogversion = new CatalogVersionModel();
//		catalogversion.setInclAssurance(Boolean.TRUE);
//		catalogversion.setInclDuty(Boolean.TRUE);
//		catalogversion.setInclFreight(Boolean.TRUE);
//		catalogversion.setInclPacking(Boolean.TRUE);
//		catalogversion.setVersion("catalogversion1");
//		catalogversion.setCatalog(catalog);
//
//		product.setCatalogVersion(catalogversion);
		product.setCode("107701");
		product.setDescription("这时hand的一个系统", Locale.CHINA);
		product.setName("电子商务", Locale.CHINA);

		EPProductModel epProduct = epProductDAO.createEPProduct(product);
		Assert.assertNotNull(epProduct);
	}
}
